<?php

namespace App\Exception;

use App\Constants\ErrorCode;
use Hyperf\Server\Exception\ServerException;
use Throwable;

class CommonException extends ServerException {
    public function __construct(string $message = "", int $code = 0, Throwable $previous = null) {
        $code = $code ?: ErrorCode::INVALID;
        parent::__construct($message, $code, $previous);
    }
}
